name_list=["zhangsan","lisi","wangwu"]
print(f'id(name_list)={id(name_list)}')
# 查数据
print(name_list[2])
print(name_list.index("wangwu"))

# 修改
name_list[1]="李四"
print(name_list)
# 增加
name_list.append("王小二")
print(name_list)

name_list.insert(0,"王小美")
print(name_list)

temp_list=['孙悟空','猪八戒','沙师弟']
name_list.extend(temp_list)
print(name_list)
print(f'id(name_list)={id(name_list)}')

# 删除指定元素remove
name_list.remove('wangwu')
print(name_list)
# 删除最后一个元素pop
name_list.pop()
print(name_list)
# clear清空元素
name_list.clear()
print(name_list)
print(f'id(name_list)={id(name_list)}')
count=name_list.count('孙悟空')
print(count)